package com.wd.tech.activity.preantenrt;

import com.wd.tech.activity.base.BasePreantert;
import com.wd.tech.activity.base.IBaseView;
import com.wd.tech.activity.bean.BeannerBean;
import com.wd.tech.activity.contreantert.Contreatnert;
import com.wd.tech.activity.model.Model;


/**
 * @author 时文豪
 * @description:
 * @date :2020/7/2 15:46
 */
public class Preantert extends BasePreantert implements Contreatnert.IPreantert {

    private Model model;

    public Preantert(IBaseView iBaseView) {
        super(iBaseView);
    }

    @Override
    protected void initModel() {
        model = new Model();
    }

    @Override
    public void OnSuccess() {
        model.OnSuccess(new Contreatnert.IModel.MyBeannerCoallack() {
            @Override
            public void BannerSuccess(BeannerBean bean) {
                IBaseView iBaseView = getView();
                if(iBaseView instanceof Contreatnert.IView){
                    Contreatnert.IView view= (Contreatnert.IView) iBaseView;
                    view.BannerSuccess(bean);
                }
            }
        });
    }
}
